/*
 Navicat Premium Data Transfer

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 50542
 Source Host           : localhost
 Source Database       : mobile_manager

 Target Server Type    : MySQL
 Target Server Version : 50542
 File Encoding         : utf-8

 Date: 06/11/2016 23:16:56 PM
*/

SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
--  Table structure for `mobile`
-- ----------------------------
DROP TABLE IF EXISTS `mobile`;
CREATE TABLE `mobile` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `models` varchar(50) CHARACTER SET gbk DEFAULT '' COMMENT '型号',
  `unique_number` varchar(100) CHARACTER SET gbk DEFAULT '' COMMENT '自定义唯一码',
  `mobile_unique_number` varchar(100) CHARACTER SET gbk DEFAULT '' COMMENT '手机自定义唯一码',
  `os` tinyint(1) DEFAULT '1' COMMENT '操作系统',
  `status` tinyint(4) DEFAULT '1' COMMENT '借还状态',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=37 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `mobile`
-- ----------------------------
BEGIN;
INSERT INTO `mobile` VALUES ('25', '4s', '4s-1', '4s-110', '1', '1'), ('26', '4s', '4s-2', '4s-111', '1', '1'), ('27', '5', '5-1', '5-110', '1', '1'), ('28', '5s', '5s-1', '5s-111', '1', '1'), ('29', '5s', '5s-2', '5s-112', '1', '1'), ('30', '6', '6-1', '6-110', '1', '1'), ('31', 'p7', 'huawei-p7-1', 'huawei-p7-110', '2', '1'), ('32', 's4', 's4-1', 's4-110', '2', '2'), ('33', 's4', 's4-2', 's4-111', '2', '1'), ('34', 's6', 's6-1', 's6-111', '2', '1'), ('35', 's6', 's6-2', 's6-113', '2', '1'), ('36', 'nokiaw1', 'nokiaw1-1', 'nokiaw1-110', '3', '1');
COMMIT;

-- ----------------------------
--  Table structure for `mobile_borrow`
-- ----------------------------
DROP TABLE IF EXISTS `mobile_borrow`;
CREATE TABLE `mobile_borrow` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `mobile_id` int(11) DEFAULT '0' COMMENT '手机ID',
  `borrow_user` varchar(8) DEFAULT '' COMMENT '借用人',
  `borrow_time` date DEFAULT '0000-00-00' COMMENT '借用时间',
  `should_return_time` date DEFAULT '0000-00-00' COMMENT '应归还日期',
  `actual_return_time` date DEFAULT '0000-00-00' COMMENT '实际归还日期',
  `status` tinyint(4) DEFAULT '0' COMMENT '是否归还',
  PRIMARY KEY (`id`),
  KEY `mobileId` (`mobile_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `mobile_borrow`
-- ----------------------------
BEGIN;
INSERT INTO `mobile_borrow` VALUES ('4', '25', '肖永标', '2016-06-09', '2016-06-11', '2016-06-10', '1'), ('5', '30', '肖永标', '2016-06-10', '2016-06-13', '2016-06-14', '1'), ('6', '32', '肖永标', '2016-06-10', '2016-06-16', '0000-00-00', '0');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
